<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <title>Document</title>
    <style>
        .box{
            border: 1px solid gray;
           background-color: #ddd;
        }
        .red{
            color: white;
            background-color: red;
        }  
        .b{
            height: 200px;
            background-color: yellow;
        }
    </style>
</head>
<body>
    <script src="./js/jquery.min.js"></script>

    <div class="container">
        <div class="box">
           <button class="btn btn-secondary">显示</button>
            <button class="btn btn-secondary">隐藏</button>
        </div>
       <div class="col-md-6 b"></div>
    </div>
</body>
<script>
    window.onload=
        () => {
            
            $('.box button:first').click(function () {
                
                $('.box').siblings().show('fast', 'swing');
                console.log(this)
                
            })
            $('.box button:last').click(function () {
                
                $('.box').siblings().hide('low','linear');
                console.log($('b').index())
                
            })
        }
    
    // $(function(){
       
        
    // })
        
</script>
</html>